from typing import List


class Solution:
    def findContentChildren(self, g: List[int], s: List[int]) -> int:
        g.sort()
        s.sort()
        s_len = len(s)-1
        g_len = len(g)-1
        count = 0

        while g_len>=0 and s_len>=0:
            if s[s_len]>=g[g_len]:
                count+=1
                s_len-=1
            g_len-=1
        return count
print(Solution().findContentChildren([10,9,8,7],[5,6,7,8]))